#ifndef __USER_INTERFACE_H
#define __USER_INTERFACE_H

#include <memory>

#include "MyLogger.h"
#include "PersistStorage.h"
#include "InstructionSrc.h"

class UserInterface
{
public:
    static std::shared_ptr<MyLogger> logger;
    static std::shared_ptr<PersistStorage> config;
    static std::unique_ptr<InstructionSrc> instSrc;
private:
    /* data */
public:
    UserInterface() = default;
    virtual ~UserInterface() = default;
    virtual void MainLoop() = 0;

    static void SetInstSrc(std::unique_ptr<InstructionSrc> &instSrc);
    static void SetLogger(std::shared_ptr<MyLogger> &logger);
    static void SetConfig(std::shared_ptr<PersistStorage> &config);
protected:
    void GetInstAndExecute();
};
#endif